import InteractiveBase from "../../../LevelCommon/InteractiveBase";
import PasswordLock from "./PasswordLock";
import Sound from "../../../../constant/SoundNameConstant";

export default class PasswordKey extends InteractiveBase {
    /** 密码键值*/
    public keyValue: string;
    /** 密码锁*/
    private passWordLock: PasswordLock;
    onStart() {
        this.passWordLock = this.owner.parent.parent.getComponent(PasswordLock);
    }
    
    protected InteractiveLogic(): boolean {
        window.gameFacade.SoundMng.playSound(Sound.soundClipArr.BUTTON);
        this.passWordLock.InputPassKey(this.keyValue);
        return true;
    }
}